package com.daocao.hua.util;

/**
 * 加解密
 * Created by Master.Dong on 2016/4/6 0006.
 */
public class MCrypt {
    // 加密
    public static String encode(String str) {
        char [] a = str.toCharArray();
        for  ( int  i =  0 ; i < a.length; i++) {
            a[i] = (char ) (a[i] ^  't' );
        }
        String s = new  String(a);
        return  s;
    }

    // 解密
    public static String decode(String str){
        char [] a = str.toCharArray();
        for(int  i =  0 ; i < a.length; i++){
            a[i] = (char ) (a[i] ^  't' );
        }
        String k = new  String(a);
        return  k;
    }
}
